]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/util: Set minimum display time for authentication messages
authorJoan Torres Lopez <joantolo@redhat.com>
Wed, 28 Jan 2026 17:01:26 +0000 (18:01 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Feb 2026 16:09:29 +0000 (17:09 +0100)
Short messages like "PIN locked" were previously displayed for only
480ms (10 chars × 48ms), making them impossible to read. Ensure all
messages are shown for at least 2 seconds.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4054>
(cherry picked from commit 72073e008f35f197201e6c38ab506fbe5973fbeb)

js/gdm/util.js

index c45579a22b2b3315a826594f5ff6cbca7a00979b..8cd18f003bef5938e9ae89398522970da0e682b7 100644 (file)
@@ -43,7 +43,10 @@ export const LOGO_KEY = 'logo';
 export const DISABLE_USER_LIST_KEY = 'disable-user-list';
 
 // Give user 48ms to read each character of a PAM message
+// or 2 seconds, whichever is longer
 const USER_READ_TIME = 48;
+const USER_READ_TIME_MIN = 2000;
+
 const FINGERPRINT_SERVICE_PROXY_TIMEOUT = 5000;
 const FINGERPRINT_ERROR_TIMEOUT_WAIT = 15;
 
@@ -250,7 +253,7 @@ export class ShellUserVerifier extends Signals.EventEmitter {
             return 0;
 
         // We probably could be smarter here
-        return message.length * USER_READ_TIME;
+        return Math.max(message.length * USER_READ_TIME, USER_READ_TIME_MIN);
     }
 
     finishMessageQueue() {